package com.nineclock.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nineclock.system.pojo.SysCompanyUserRole;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

/**
 * @author 黑马程序员
 * @Company http://www.ithiema.com
 * @Version 1.0
 */
@Mapper
public interface SysCompanyUserRoleMapper extends BaseMapper<SysCompanyUserRole> {
    @Delete("DELETE " +
            "FROM sys_company_user_role " +
            "WHERE role_id = #{mi} AND company_id = #{companyId}")
    void deleteManager(Long companyId,Long mi);
    @Insert("INSERT INTO sys_company_user_role(company_user_id,role_id,company_id)" +
            "VALUES(#{userId},#{mi},#{companyId})")
    void insertManager(Long userId, Long companyId,Long mi);
}
